package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class AddBlackMethods extends BaseMethods {

    private static AddBlackMethods m_ins = null;

    public static AddBlackMethods getInstance() {
        if (m_ins == null) {
            synchronized (AddBlackMethods.class) {
                if (m_ins == null) {
                    m_ins = new AddBlackMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Friend/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void add_blacklist(Subscriber<Object> subscriber,
                      int uid,
                      String hashid,String bid ) {
        Observable observable = initService().add_blacklist(System.currentTimeMillis()+"",
                "7b788459fcadbf34bef91f20949ec3cb",uid,hashid,bid
        );
        toSubscribe(observable, subscriber);
    }
}
